package main

import (
	"fmt"
	"regexp"
)

func main() {
	str := "jb51@163.com.com.cn.xxxx.xxx"
	match:=regexp.MustCompile("\\w[-\\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\\.)+[A-Za-z]{1,2}")
	matched := match.MatchString(str)
	fmt.Println(matched)
	s:=match.FindString(str)
	fmt.Println(s)

}